﻿@model UscSunShine.Models.Post

@{
    ViewBag.Title = "新建公告";
}

<h2>新建公告</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @*<div class="form-group">
                @Html.LabelFor(model => model.DepartmentID, "DepartmentID", htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.DropDownList("DepartmentID", null, htmlAttributes: new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.DepartmentID, "", new { @class = "text-danger" })
                </div>
            </div>*@
        @Html.HiddenFor(t => t.DepartmentID)

        <div class="form-group">
            @Html.LabelFor(model => model.Title, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Title, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Content, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Content, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.InputDate, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.InputDate, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.InputDate, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ViewTimes, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ViewTimes, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.ViewTimes, "", new { @class = "text-danger" })
            </div>
        </div>

        @Html.HiddenFor(t => t.PostCategory)

        @*<div class="form-group">
                @Html.LabelFor(model => model.PostCategory, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EnumDropDownListFor(model => model.PostCategory, htmlAttributes: new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.PostCategory, "", new { @class = "text-danger" })
                </div>
            </div>*@

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="保存" class="btn btn-primary" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("返回公告列表", "Index")
</div>


@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    <link rel="stylesheet" href="~/KindEditor/themes/default/default.css" />
    <link rel="stylesheet" href="~/KindEditor/plugins/code/prettify.css" />
    <script charset="utf-8" src="~/KindEditor/kindeditor-min.js"></script>
    <script type="text/javascript" src="~/KindEditor/lang/zh_CN.js"></script>
    <script charset="utf-8" src="~/KindEditor/plugins/code/prettify.js"></script>
    <script type="text/javascript" src="~/Scripts/usc-content.js"></script>
}
